#!/bin/bash
read -p "please input two numbers:" num1 num2
function Usage(){
        echo $"Usage: sh $0 <num1> <num2>"
        exit 1
}
expr $num1 + 1 &>/dev/null 2>&1
ResultA=$?
expr $num2 + 1 &>/dev/null 2>&1
ResultB=$?
if [ $ResultA -ne 0 -o $ResultB -ne 0 ];then
	Usage
fi
echo "num1+num2=$(($num1+$num2))"
echo "num1-num2=$(($num1-$num2))"
echo "num1*num2=$(($num1+$num2))"
if [ $num2 -eq 0 ];then
        echo "you input num2 is error"
        echo "num1/num2=error"
else
        echo "num1/num2=$(($num1/$num2))"

fi
